﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

namespace NinjaToolbox.SubComponentModule.Example
{
    [TargetSubComponent(typeof(SE2_Jump))]
    [SubComponentPath("Example2/Jump")]
    [Rename("Jump")]
    public class SE2_Jump_Model : SubComponentModelBase
    {
        public float jumpForce;
        public string jumpAnimKey = "";


        protected override void EditorSerialize(UnionSerializeWriter serializeWriter)
        {
            base.EditorSerialize(serializeWriter);

            serializeWriter.Write(jumpForce);
            serializeWriter.Write(jumpAnimKey);
        }

        protected override void EditorDeserialize(UnionSerializeReader serializeReader)
        {
            base.EditorDeserialize(serializeReader);

            jumpForce = serializeReader.ReadFloat();
            jumpAnimKey = serializeReader.ReadString();
        }
    }
}
